package cn.baisee.Test;

import cn.baisee.entity.Goods;
import cn.baisee.process.ProcessRequest;
import cn.baisee.process.impl.Boos;
import cn.baisee.process.impl.Finance;
import cn.baisee.process.impl.GoodsProcessChain;
import cn.baisee.process.impl.manager;
import cn.baisee.request.GroundingRequest;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class testdome {
    public static void main(String[] args) {
        GroundingRequest request = new GroundingRequest();
        Goods goods = new Goods();
        goods.setCount(1);
        goods.setName("手机");
        goods.setPrice(500);
        request.setGoods(goods);
        request.setLastRequestName("");
        request.setApplyDate(new Date());
        request.setRequestName("张三");
        GoodsProcessChain chain = new GoodsProcessChain();
        chain.setIndex(-1);
        List<ProcessRequest> list=new ArrayList<ProcessRequest>();
        list.add(new Finance());
        list.add(new manager());
        list.add(new Boos());
        list.size();
        chain.setList(list);
        chain.setRequest(request);
        chain.doChain(request);
        System.out.println(chain.doChain(request));
    }
}
